package conson.tech.manage.facade.controller.merchant;

import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import conson.tech.core.constant.SecurityConstants;
import conson.tech.core.response.Response;
import conson.tech.manage.merchant.entity.from.MerchantSceneCostFrom;
import conson.tech.manage.merchant.entity.from.MerchantSceneQueryFrom;
import conson.tech.manage.merchant.entity.vo.MerchantAuditInfoVo;
import conson.tech.manage.merchant.entity.vo.MerchantBaseSettleCostVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;

/**
 * ClassName: MerchantSceneManageController
 * Description: 商户场景管理控制器
 * Author: HXL
 * Date: 2020/7/3 7:11 下午
 * Version: 1.0
 */
@Slf4j
@RestController
@Api(value = "商户场景管理控制器",tags = "商户场景管理控制器")
@RequestMapping((SecurityConstants.MANAGERAPI + "/merchant"))
public class MerchantSceneManageController {


    @ApiOperation(value = "商户场景审核信息查询")
    @ApiImplicitParam(name = "from", value = "通用请求", required = true, dataType = "MerchantSceneQueryFrom")
    @PostMapping("/manage/querySceneAudit")
    public Response<Page<MerchantAuditInfoVo>> queryMerchantSceneAudit(HttpServletRequest request,@Valid @RequestBody  MerchantSceneQueryFrom from){
        log.info("MerchantSceneManageController【商户场景审核信息查询】--> inParam:【{}】", JSONUtil.toJsonStr(from));

        return Response.success();
    }
    @ApiOperation(value = "商户场景审核详细信息")
    @ApiImplicitParam(name = "from", value = "通用请求", required = true, dataType = "MerchantSceneQueryFrom")
    @PostMapping("/manage/querySceneAuditDetails")
    public Response<Page<MerchantBaseSettleCostVo>> queryMerchantAuditDetailsInfo(HttpServletRequest request,@Valid @RequestBody  MerchantSceneQueryFrom from){
        log.info("MerchantSceneManageController【商户场景审核详细信息】--> inParam:【{}】", JSONUtil.toJsonStr(from));

        return Response.success();
    }

    @ApiOperation(value = "商户场景详细信息")
    @ApiImplicitParam(name = "from", value = "通用请求", required = true, dataType = "MerchantSceneQueryFrom")
    @PostMapping("/manage/querySceneDetails")
    public Response<Page<MerchantBaseSettleCostVo>> queryMerchantDetailsInfo(HttpServletRequest request,@Valid @RequestBody  MerchantSceneQueryFrom from){
        log.info("MerchantSceneManageController【商户场景审核信息查询】--> inParam:【{}】", JSONUtil.toJsonStr(from));

        return Response.success();
    }
    @ApiOperation(value = "商户场景费用商户号开关信息提交")
    @ApiImplicitParam(name = "from", value = "通用请求", required = true, dataType = "MerchantSceneCostFrom")
    @PostMapping("/manage/querySceneSwitch")
    public Response querySceneSwitch(HttpServletRequest request,@Valid @RequestBody MerchantSceneCostFrom from){
        log.info("MerchantSceneManageController【商户场景费用商户号开关信息提交】--> inParam:【{}】", JSONUtil.toJsonStr(from));

        return Response.success();
    }
}
